<template>
  <router-view />
</template>

<script lang="ts" setup>
import {useRouter} from "vue-router";

const routerMap = {
  setting: "/",
}

const router = useRouter();

window.rubick?.onPluginEnter(({code}) => {
  router.push({
    path: routerMap[code] || "/search",
    query: {
      code,
    }
  })
});
</script>

<style lang="less">
* {
  margin: 0;
  padding: 0;
}
</style>
